<me:UIWFN x:Class="WPFExcelReport.TWFUSER"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                     xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"   
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"    
                    xmlns:WD="clr-namespace:WPFExcelReport;assembly=TICC_WFEVENTDEF"  
                    xmlns:BOOK="clr-namespace:WPFExcelReport;assembly=TICC_WFSUBSCRIBER"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIWFN.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>      
        <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:PNumConverter x:Key="pnum"/>
    </me:UIWFN.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="1*" />
            <RowDefinition   Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0"   Margin="0,0,-0.2,0">
            <WrapPanel >
                <ex:TXT72 Text="{Binding KRS,ElementName=TV}" Width="30"/>
                <ex:TXT72 Text="{Binding LFD,ElementName=TV}" Width="60"/>
                <ex:TXT72 Text="{Binding POS,ElementName=TV}" Width="40"/>
                <Grid Margin="10,0,0,0"  >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button   Click="QueryCommand" Height="20" Margin="5,0,0,0" Width="24">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Refresh.png" />
                        </Button.Background>
                    </Button>
                </Grid>
                <Grid Margin="10,0,0,0"  >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button   Click="EditCommand" Height="20" Margin="5,0,0,0" Width="24">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Forward.png" />
                        </Button.Background>
                    </Button>
                </Grid> 
            </WrapPanel>
        </StackPanel>
        <DataGrid   Grid.Row="1" Grid.Column="0"  
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                              HeadersVisibility="Column"                           
                              ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                              ScrollViewer.VerticalScrollBarVisibility="Auto"  
                         Margin="0,0,0,0" 
                              > 
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ROWNID}"   Width="Auto"  MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=WHAT, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=操作}}"  Width="120" MinWidth="60"/>
                <DataGridTextColumn Binding="{Binding Path=KRS}"   Width="Auto"  MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=LFD,Converter={StaticResource pnum}}" Header="{Binding Source={Localization:Translate Word=订单}}"   Width="Auto"  MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=CONTROL}" Header="{Binding Source={Localization:Translate Word=状态}}"     Width="Auto"  MinWidth="30"/> 
                <DataGridTextColumn Binding="{Binding Path=WFEVENTS}" Header="{Binding Source={Localization:Translate Word=事件}}"  Visibility="Collapsed"   Width="Auto"  MinWidth="40"/> 
                <DataGridTextColumn Binding="{Binding Path=HOW, Converter={StaticResource ResourceKey=gb2312}}"   Header="{Binding Source={Localization:Translate Word=请求}}"  Width="120" MinWidth="80"/>
                <DataGridTextColumn Binding="{Binding Path=NEWUSER}" Header="{Binding Source={Localization:Translate Word=创建者}}"  Width="Auto" MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=NEWTIME}" Header="{Binding Source={Localization:Translate Word=创建日期}}"  Width="Auto" MinWidth="40"/>
            </DataGrid.Columns>
        </DataGrid>


    </Grid>
</me:UIWFN>
